package com.igeek.boot.controller;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * *User 訫
 * *Description TODO
 * *Date 2024/8/20
 **/
@RestController
public class DruidController {

    @Resource
    private JdbcTemplate jdbcTemplate;

    @GetMapping("/count")
    public Long getUserCount(){
        String sql = "select count(*) from user";
        Long l = jdbcTemplate.queryForObject(sql, Long.class);
        return l;
    }
}
